package com.javaee.wordtree.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName(value = "user_story_progress", autoResultMap = true)
public class UserStoryProgress {
    @TableId(type = IdType.AUTO)
    private Long id;
    
    private String userId;
    private Long templateId;
    private Long currentPageId;
    
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Integer> choicesMade;
    
    private Boolean isCompleted;  // 确保有这个字段
    private LocalDateTime startedAt;
    private LocalDateTime updatedAt;
    private LocalDateTime completedAt;
}